/*import request from '@/utils/request'

export function loginByUsername(username, password) {
  const data = {
    username,
    password
  }
  return request({
    url: '/login/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/login/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}*/
import agentHttp from '@/utils/agentHttp.js'

export function loginByUsername(username, password) {
  const data = {
    username,
    password
  }
  return agentHttp.post('adminApi/member/manager_login',data)
}

export function logout(data) {
  return agentHttp.get('adminApi/member/login_out')
  //return Promise.resolve('success')
}

export function getUserInfo(token) {
  const data={
    role: ['admin'],
    token: 'admin',
    introduction: '我是超级管理员',
    avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
    name: 'Super Admin'
  };
  return Promise.resolve(data)
}

